//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CHANNEL_REPLY_H__
#define __CHANNEL_REPLY_H__

#include "ChannelPackage.h"

class ChannelReply : public ChannelPackage
{
protected:
    unsigned int m_replyPackageNumber; // reply which package
    int m_command;

public:
    ChannelReply();
    ChannelReply(unsigned int channelNumber,
            unsigned int replyPackageNumber,
            int command);
    virtual ~ChannelReply();

    inline unsigned int GetReplyPackageNumber() const
    {
        return m_replyPackageNumber;
    }
    inline void SetReplyPackageNumber(unsigned int replyPackageNumber)
    {
        m_replyPackageNumber = replyPackageNumber;
    }
    inline int GetCommand() const
    {
        return m_command;
    }
    inline void SetCommand(int command)
    {
        m_command = command;
    }

    virtual unsigned int GetPackageSize();
    virtual void WriteBuffer(char* buffer);
    virtual int Read(ReadInputStream is);
};

#endif //__CHANNEL_REPLY_H__
